package com.mkz.core.mvc.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.mkz.core.mvc.interceptor.MvcInterceptor;

@Configuration
public class WebAppConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
    	//注册自定义拦截器，添加拦截路径和排除拦截路径
    	registry.addInterceptor(new MvcInterceptor()).addPathPatterns("/**").excludePathPatterns("api/path/login");
    }
}